//
//  LSAboutLookScoreVController.m
//  LookScore
//
//  Created by wr on 2017/12/16.
//  Copyright © 2017年 ChongQingXunTiCompany. All rights reserved.
//

#import "LSAboutLookScoreVController.h"

@interface LSAboutLookScoreVController ()

@end

@implementation LSAboutLookScoreVController
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    self.navigationController.navigationBar.translucent = NO;
    
}
- (void)viewDidDisappear:(BOOL)animated{
    [super viewDidDisappear:animated];
    self.navigationController.navigationBar.translucent = YES;
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=@"关于看比分";
    
    self.view.backgroundColor=[UIColor whiteColor];
    UIImageView *topImgView=[[UIImageView alloc]init];
    topImgView.image=[UIImage imageNamed:@"NavBlueLookLogo"];
    [self.view addSubview:topImgView];
    topImgView.sd_layout.centerXEqualToView(self.view).widthIs(150).topEqualToView(self.view).offset(50).heightIs(50);
    
    
    NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
    NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
    UILabel *versionLab=[[UILabel alloc]init];
    versionLab.font=LSFontSize13;
    versionLab.text=[NSString stringWithFormat:@"版本%.1f",[app_Version floatValue]];
    versionLab.textColor=LSTitleGrayColor1;
    versionLab.textAlignment=NSTextAlignmentCenter;
    [self.view addSubview:versionLab];
    versionLab.sd_layout.centerXEqualToView(self.view).topSpaceToView(topImgView, 10).leftEqualToView(self.view).rightEqualToView(self.view).heightIs(20);
    
    NSString *titleString=@"看比分APP是一款为彩民量身打造的专业数据资讯服务的工具软件。我们致力于为彩民提供优质的足球相关的体育资讯,即时比分、即时指数和足球联赛资料库等。通过多种数据 , 让彩民用得舒服！\n   我们回砥砺前行,不辱使命，为您提供更具价值的体育数据。";
    UILabel *titleLab=[[UILabel alloc]init];
    titleLab.font=LSFontSize13;
    titleLab.numberOfLines=0;
    titleLab.textColor=LSTitleGrayColor1;
    [titleLab setAttributedText:[CommonClass setTitle:titleString lineSpace:8 textSpace:1]];
    [self.view addSubview:titleLab];
    titleLab.sd_layout.leftEqualToView(self.view).offset(LSSpaceLeftWidth2).rightEqualToView(self.view).offset(-LSSpaceLeftWidth2).topSpaceToView(versionLab, 20);
    
    NSArray *array=@[@"官方网站: www.kanbifen.com",@"官方微信公众号: kanbifen",@"商务合作:",@"官方对电话: 023-68888888 联系我们"];
    UILabel *label;
    for (int i=0; i<4; i++) {
        NSString *string=array[i];
       label=[[UILabel alloc]init];
        label.font=LSFontSize13;
        label.textColor=LSTitleGrayColor1;
        label.tag = 100+i;
        if (i==3) {
            [label setAttributedText:[CommonClass setBasicTitle:@"官方对电话: 023-68888888" homeTitle:@"" changeTitle:@"  联系我们" color:LSSubColor75b8fe size:13 isBold:NO]];
        }else{
            [label setAttributedText:[CommonClass setTitle:string lineSpace:8 textSpace:1]];
        }
        
        [self.view addSubview:label];
        label.sd_layout.leftEqualToView(self.view).offset(LSSpaceLeftWidth2).rightEqualToView(self.view).offset(-LSSpaceLeftWidth2).topSpaceToView(titleLab, 15+22*i).heightIs(22);
    }
    
    UIButton *callUs = [UIButton new];
    [callUs addTarget:self action:@selector(callUsEvent:) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:callUs];
    callUs.sd_layout.leftEqualToView(self.view).offset(LSSpaceLeftWidth2).rightEqualToView(self.view).offset(-LSSpaceLeftWidth2).topSpaceToView(titleLab, 15+22*3).heightIs(22);

    UIButton *checkUpdateBu=[UIButton new];
    checkUpdateBu.layer.cornerRadius=5;
    checkUpdateBu.layer.masksToBounds=YES;
    [checkUpdateBu setTitle:@"检查更新" forState:UIControlStateNormal];
    [checkUpdateBu setBackgroundImage:[CommonClass getImageWithBgColor:LSSubColor7ec5fd] forState:UIControlStateHighlighted];
    [checkUpdateBu setBackgroundImage:[CommonClass getImageWithBgColor:LSSubColor9dd3cc] forState:UIControlStateNormal];
    [checkUpdateBu setTitleColor:LSTitleWhiteColor forState:UIControlStateNormal];
    checkUpdateBu.titleLabel.font=LSFontSize15;
    [checkUpdateBu addTarget:self action:@selector(checkUpdateOrShareEvent:) forControlEvents:UIControlEventTouchUpInside];
    checkUpdateBu.tag=10;
//    [self.view addSubview:checkUpdateBu];
    checkUpdateBu.sd_layout.leftEqualToView(self.view).offset(LSSpaceLeftWidth2).topSpaceToView(label, 34).heightIs(LSButtonHeight).rightEqualToView(self.view).offset(-LSSpaceLeftWidth2);
    
    
    UIButton *shareBu=[UIButton new];
    
    shareBu.layer.cornerRadius=5;
    shareBu.layer.masksToBounds=YES;
    shareBu.layer.borderColor=LSSubColor9dd3cc.CGColor;
    shareBu.borderWidth=1;
    [shareBu setTitle:@"分享给好友" forState:UIControlStateNormal];
    shareBu.backgroundColor=[UIColor    whiteColor];
    [shareBu setTitleColor:LSSubColor9dd3cc forState:UIControlStateNormal];
    shareBu.titleLabel.font=LSFontSize15;
    shareBu.tag=11;
    [shareBu addTarget:self action:@selector(checkUpdateOrShareEvent:) forControlEvents:UIControlEventTouchUpInside];
//    [self.view addSubview:shareBu];
    shareBu.sd_layout.leftEqualToView(self.view).offset(LSSpaceLeftWidth2).topSpaceToView(checkUpdateBu, 19).heightIs(LSButtonHeight).rightEqualToView(self.view).offset(-LSSpaceLeftWidth2);
    
   
}

- (void)callUsEvent:(UIButton *)sender{
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"telprompt:023-68888888"]];
}
-(void)checkUpdateOrShareEvent:(UIButton *)sender{
    
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
